import Home from '@/views/pages/home'
import demoRouter from './group/demo'
import databasesRouter from './group/databases'
import userRouter from './group/user'

const base = [
  {
    path: '/',
    name: 'home',
    component: Home,
    children: [
      {
        path: '/index',
        name: 'index',
        component: () => import('@/views/pages/index')
      },
      {
        path: '/account',
        name: 'account',
        component: () => import('@/views/pages/weixin/account')
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '@/views/pages/login')
  },
  // 首页
  {
    path: '/sitehome',
    name: 'siteHome',
    component: () => import('@/views/pages/site/home')
  },
  // 投诉举报
  {
    path: '/complaints-report',
    name: 'ComplaintsReport',
    component: () => import('@/views/pages/site/complaints-report')
  },
  // 资金监督
  {
    path: '/capital',
    name: 'Capital',
    component: () => import('@/views/pages/site/capital')
  },
  // 区直资金、街道资金详情页
  {
    path: '/financial-reporting',
    name: 'FinancialReporting',
    component: () => import('@/views/pages/site/financial-reporting')
  },
  // 组织机构
  {
    path: '/leading-group',
    name: 'LeadingGroup',
    component: () => import('@/views/pages/site/leading-group')
  },
  // 公车监督
  {
    path: '/bus-supervision',
    name: 'BusSupervision',
    component: () => import('@/views/pages/site/bus-supervision')
  },
  // 项目监督
  {
    path: '/fund-supervision',
    name: 'FundSupervision',
    component: () => import('@/views/pages/site/fund-supervision')
  },
  // 街道监督
  {
    path: '/group-personnel',
    name: 'GroupPersonnel',
    component: () => import('@/views/pages/site/group-personnel')
  },
  // 审查调查
  {
    path: '/examination',
    name: 'Examination',
    component: () => import('@/views/pages/site/examination')
  },
  // 政策法规
  {
    path: '/policy',
    name: 'Policy',
    component: () => import('@/views/pages/site/policy')
  },
  // 全部文章
  {
    path: '/all-articles',
    name: 'AllArticles',
    component: () => import('@/views/pages/site/all-articles')
  }
]
base[0].children.push.apply(base[0].children, demoRouter)
base[0].children.push.apply(base[0].children, databasesRouter)
base[0].children.push.apply(base[0].children, userRouter)
export default base
